package com.cade.agriculturemall.view.classify.goodsdetail;

import android.content.Context;
import android.support.v7.app.AppCompatDialog;
import android.widget.TextView;

import com.cade.agriculturemall.R;
import com.cade.agriculturemall.model.GoodsDetailEntity;

/**
 * Created by Administrator on 2018/4/26 0026.
 */

public class SpecificationDialog extends AppCompatDialog {
    GoodsDetailEntity mEntity = new GoodsDetailEntity();

    public SpecificationDialog(Context context, GoodsDetailEntity mEntity) {
        super(context);
        this.mEntity = mEntity;
        init();
    }

    private void init() {
        setContentView(R.layout.layout_specification_dialog);
        TextView tvTitle = (TextView) findViewById(R.id.specification_tv_tittle);
        TextView tvNewPrice = (TextView) findViewById(R.id.specification_tv_new_price);
        TextView tvSellOff = (TextView) findViewById(R.id.specification_tv_sell_off);
        TextView tvSite = (TextView) findViewById(R.id.specification_tv_site);
        tvTitle.setText("商品名称："+mEntity.getTitle());
        tvNewPrice.setText("商品价格："+mEntity.getPriceNew());
        tvSellOff.setText("销量："+mEntity.getSellOff());
        tvSite.setText("发货地址："+mEntity.getSite());
    }
}
